package top.infopub.job.quartz.exec;


import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import top.infopub.job.fia.service.PayBillService;
import top.infopub.job.quartz.exec.base.BaseJob;
import top.infopub.util.SpringContext;


/**
 * 财务付款单登记fia_pay_bill 数据归集job</br>
 * 将各业务承接单表中已审批通过的数据copy至此表，注：准实时同步，而非月度同步
 * @author wangw
 * @version 2020年3月4日
 * @see FiaPayBillJob
 * @since
 */
public class FiaPayBillJob extends BaseJob {

    private static PayBillService payBillService;

    static {
        payBillService = SpringContext.getBean(PayBillService.class);
    }

    public FiaPayBillJob() {}

    @Override
    public void execute(JobExecutionContext context)
        throws JobExecutionException {
        try {
            // 执行核心方法 
            payBillService.payBillJob();
            //logSucceed("财务付款单登记fia_pay_bill数据同步完成");
        }
        catch (Exception e) {
            log.error("财务付款单登记fia_pay_bill数据同步error", e);
            logFail(e, true);
        }
    }
}
